#include<bits/stdc++.h>
using namespace std;

int ch[1005];

int main()
{
	int n=1;
	int sum = 1;
	int num;
	char a;
	ch[sum] = 1;
	while(sum<=1000)
	{
		sum = 2*n*n-1;
		ch[sum] = 2*n-1;
		n++;
	}
	//ch
	cin>>num>>a;
	int now=num,max;
	while(ch[now] == 0) 
	{
		now--;
	}
	num = num-now;
	max = ch[now];
	while(ch[now]>1)
	{
		for(int x=1;x<=(max-ch[now])/2;x++){
			cout<<' ';
		}
		for(int x=1;x<=ch[now];x++){
			cout<<a;
		}
		cout<<endl; 
		now -= 2*ch[now];
	}
	//cout<<a;
	for(int x=1;x<=(max-1)/2;x++){
			cout<<' ';
	}
		cout<<a<<endl;
		now=7;
	while(ch[now]<=max)
	{
		for(int x=1;x<=(max-ch[now])/2;x++){
			cout<<' ';
		}
		for(int x=1;x<=ch[now];x++){
			cout<<a;
		}
		int m=ch[now];
		now += (m+2)*2;
		cout<<"\n"; 
	}
	cout<<num<<endl;
	return 0;
}
